class InvoiceDetail < ActiveRecord::Base
	belongs_to :invoice, :class_name => Invoice, :foreign_key => "invoice_id"
	belongs_to :invoice_item_type, :class_name => InvoiceItemType, :foreign_key => "invoice_item_type_id"
	belongs_to :stock_logging, :class_name => StockLogging, :foreign_key => "stock_logging_id"
	
	accepts_nested_attributes_for :stock_logging
	
	validates :fee, :discount , presence: true 
end
